/*
  * tungvc
  * bao gom image va label
  */

import QtQuick 2.0
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1

Item {

    property string magazineImage: "";// "qrc:/resouces/images/drawable-hdpi/logo_info_docbao.png"
    property string magazineName  : "";//Tin tuc tong hop"
    id: id_magazineItem
    width: 300
    height: 100

    signal clicked

    Label {
        id: id_lblMagazineName
        text: magazineName
        anchors.right: id_imageMagazine.right
        anchors.rightMargin: 0
        anchors.left: id_imageMagazine.right
        anchors.leftMargin: 5
        anchors.bottom: id_imageMagazine.bottom
        anchors.bottomMargin: 0
        anchors.top: id_imageMagazine.top
        anchors.topMargin: 0
        font.bold: true
        // horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
    }

    Image {
        id: id_imageMagazine
        width: parent.height
        anchors.left: id_magazineItem.left
        anchors.leftMargin: 0
        anchors.bottom: id_magazineItem.bottom
        anchors.bottomMargin: 0
        anchors.top: id_magazineItem.top
        anchors.topMargin: 0
        source: magazineImage

    }


    MouseArea{
        anchors.fill: id_magazineItem
        onClicked: console.log("magazine click")
    }

    //    Rectangle {
    //        id: recClickId1
    //        width: iteamId.width; height: 1; color: "#cccccc"
    //        anchors.bottom: iteamId.bottom
    //        visible: iteamId.ListView.isCurrentItem ? false : true
    //    }

    //    Rectangle {
    //        id: recClickId2
    //        width: iteamId.width; height: 1; color: "white"
    //        visible: iteamId.ListView.isCurrentItem ? false : true
    //    }





}
